const rules = {
  bankName: [
    {
      required: true,
      message: '请输入银行卡名称',
      trigger: 'blur'
    },
    {
      max: 10,
      message: '银行卡名称限制输入10个字'
    },
    {
      pattern:
        /^(?:[\u3400-\u4DB5\u4E00-\u9FEA\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0])+$/,
      message: '银行卡名称不能为特殊字符',
      trigger: 'blur'
    }
  ],
  icon: [
    {
      required: true,
      message: '请上传银行卡logo',
      trigger: 'change'
    }
  ],
  backgroundImage: [
    {
      required: true,
      message: '请上传银行卡背景',
      trigger: 'change'
    }
  ],
  sort: [
    {
      required: true,
      message: '请输入排序值',
      trigger: 'blur'
    },
    {
      pattern: /^[1-9]\d{0,3}$/,
      message: '请输入1-9999'
    }
  ]
}

export default rules
